#ifndef PISMONITOR_H
#define PISMONITOR_H

#include <QWidget>
#include <QTimer>
#include <QLabel>
#include <QPushButton>
#include <QSignalMapper>
#include <QMouseEvent>
#include "mlabel.h"
#ifdef M1515
#include "hisi_avic.h"
#endif

static const uint8_t camCycleNum[6][4] = {{0,1,2,3},
                                          {4,5,6,7},
                                          {8,9,10,11},
                                          {12,13,14,15},
                                          {16,17,18,19},
                                          {20,21,127,127}};

enum VidLinkTpye
{
    CabBoardOpen=0, //司机台盖板
    DoorIso,                  //车门隔离
    CabinetOpen,         //客室电器柜盖板打开
    FireExtOpen,          //灭火器打开
    AntClpDor,                    //二门防夹
    ODSObstacle,         //司机眼障碍物
    PassiveObstacle,    //被动障碍物
    PECURequest,        //PECU
    DorEmyOpen,        //车门紧急解锁
    FireDetected,         //火灾
    VidLinkCount
};

typedef struct VideoLinkage
{
    VidLinkTpye _videoType;
    int _serialNo;
    MLabel *VidTypeLabel;
} VideoLinkage;

typedef struct FourScreenCameraIndex
{
    uint8_t camIdx[4];
}FourICI;

typedef struct SingleScreenCameraIndex
{
    uint8_t camIdx;
}SingleICI;

typedef struct OneTypeVideoLnkNeedCams
{
    uint8_t camCount;
    uint8_t camIdx[4];
}VidLnkCams;

namespace Ui {
class PISMonitor;
}

class PISMonitor : public QWidget
{
    Q_OBJECT

public:
    explicit PISMonitor(QWidget *parent = 0);
    enum{SingleScreen,FourScreen};
    enum{CycleMode,StaticMode};

    ~PISMonitor();
    QPoint pismonitor_window_localpos();
    void setPisMonitor_window_globalpos(QPoint pos);
private:
    Ui::PISMonitor *ui;
    QPoint m_PisMonitor_Window_GlobalPos;
};

#endif // PISMONITOR_H
